package com.example.demo.Controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/prop")
public class ConfigController {
   @Value("${server.port}")
    private String port;
//    @Value("${mykey.key1}")
//    private String key1;

    @Value("${spring.datasource.url}")
    private String myUrl;

    @RequestMapping("/getValue")
    public String getValue(){

        return "port= "+ port + " myUrl: "+ myUrl ;
    }

}
